/*----------------------------------------------------------------------------
 * QuickMenu
 * ---------------------------------------------------------------------------
 * Date      : 2011-07-04
 * Author    : naiyumie
 * ---------------------------------------------------------------------------
 * USAGE
 * ---------------------------------------------------------------------------
 *
 * ---------------------------------------------------------------------------
 * EXAMPLE
 * ---------------------------------------------------------------------------
 *
 *----------------------------------------------------------------------------
 */
$.fn.QuickMenu	= function ()
{
	var margin	= 250;
	var element	= $(this);

	$(element).css({'position':'absolute', 'bottom':'auto'}).css('top', 30);

	var currentPosition = parseInt($(element).css('top'));

	$(window).scroll(function()
	{
		var position = $(window).scrollTop();

		if (position>margin)
		{
			$(element).stop().animate({'top':(position+currentPosition-margin)+'px'}, 1000);
		}
		else
		{
			$(element).stop().animate({'top':30}, 1000);
		}
	});

};